<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title th:inline="text">[(${myTitle})]</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<script>
</script>
<!--你好 尊敬的：-->
<!--<h1 th:if="${user}" th:text="'您好，尊敬的' + ${user.username}"></h1>-->

<!--<h1 th:if="${authorities}" th:each="authority : ${authorities}" th:text="${authority}"></h1>-->
<h2></h2>
<form action="/" method="post" onsubmit="return false">
    username:<input name="username" type="text" value=""/><br>
    password:<input name="password" type="password" value=""/><br>
    <button id="login"></button>
    <button onclick="window.location.href='/register'"></button>
</form>
<button id="btn"></button>
<button onclick="window.location.href = '/addProject'">新增</button><br>
<!--<button onclick="window.location.href = '/authenticateByPassword'">获取token</button><br>-->
<button onclick="getToken()">获取token</button><br>
<button onclick="window.location.href = '/list'">带token新增</button><br>
</body>
<script>
    // $(function () {
    //
    // });
    function getToken(){
        // get(url,data,success(response,status,xhr),dataType)
        $.get("/authenticateByPassword", {}, function(data){
            console.log(data);
        })
    }
</script>
</html>